require('Particles')
require('Shaders')

Star = {}
Star.__index = Star

function Star.load(x, y, life, em)

	local star = {}
	setmetatable(star, Star)
	star.x = x
	star.y = y
	star.pixelEffect = love.graphics.newPixelEffect((Shaders.getNoEffect()):format(#star))
	star.particleSys = Particles.getStarParticleSys(x,y,life,em)
	star.particleSys:start()
	return star
	
end

function Star:update(dt)

	self.particleSys:update(dt)
	
end

function Star:draw()

	love.graphics.setColorMode("modulate")
	love.graphics.setBlendMode("additive")
	love.graphics.draw(self.particleSys, self.x, self.y)
			
end